package io.gitee.zhangbinhub.acp.core.ftp.conf

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty

/**
 * @author zhang by 21/06/2019
 * @since JDK 11
 */
class FtpListener {

    @JacksonXmlProperty(localName = "name", isAttribute = true)
    var name: String? = null

    @JacksonXmlProperty(localName = "enabled", isAttribute = true)
    var enabled = false

    @JacksonXmlProperty(localName = "port", isAttribute = true)
    var port: Int = 0

    @JacksonXmlProperty(localName = "anonymousLoginEnabled", isAttribute = true)
    var anonymousLoginEnabled = false

    @JacksonXmlProperty(localName = "pwdEncryptMode", isAttribute = true)
    var pwdEncryptMode = "MD5"

    @JacksonXmlProperty(localName = "loginFailureDelay", isAttribute = true)
    var loginFailureDelay = 30

    @JacksonXmlProperty(localName = "maxLoginFailures", isAttribute = true)
    var maxLoginFailures = 20

    @JacksonXmlProperty(localName = "maxLogins", isAttribute = true)
    var maxLogins = 10

    @JacksonXmlProperty(localName = "maxAnonymousLogins", isAttribute = true)
    var maxAnonymousLogins = 20

    @JacksonXmlProperty(localName = "maxThreads", isAttribute = true)
    var maxThreads = 10

    @JacksonXmlProperty(localName = "defaultHomeDirectory", isAttribute = true)
    var defaultHomeDirectory: String? = null

    @JacksonXmlProperty(localName = "anonymousWritePermission", isAttribute = true)
    var anonymousWritePermission = false

    @JacksonXmlProperty(localName = "userFactoryClass", isAttribute = true)
    var userFactoryClass: String? = null

}
